<!doctype html>
<html lang="en">
	<head>
		<title>JavaScript Patterns</title>
		<meta charset="utf-8">
	</head>
	<body>
		<script>
			/* Title: data
			 * Description: pattern and antipattern of using data
			 */

			// antipattern
			$(elem).data(key, value);


			// preferred
			$.data(elem, key, value);


			// References
			// http://paulirish.com/2009/perf/
		</script>
	</body>
</html>